package com.hqd.test.event;

import com.hqd.test.observe.GieGie;

public class FansListener3 implements GieGieListener<GieGieEvent> {
    private String name = "孙七";

    @Override
    public void doSomething(GieGieEvent event) {
        GieGie gg = event.getSource();
        if (event instanceof ScandalEvent) {
            System.out.println(String.format("粉丝'%s'知道了GieGie'%s'正在 %s,马上去吃瓜", name,
                    gg.getName(), gg.getMsg()));
        } else if (event instanceof ReleaseAlbumsEvent) {
            System.out.println(String.format("粉丝'%s'知道了GieGie'%s'正在 %s,马上去购买", name,
                    gg.getName(), gg.getMsg()));
        }
    }
}
